Automatic Client-Server Code Generator

ABSTRACT

According to certain embodiments there is provided a system and method which enables clients to automatically generate client CLI response-objects directed for reading new unfamiliar server CLI response-objects which are received from servers without the need to write or obtain new code for each new server response-object.

FIELD OF THE INVENTION

This invention relates to the field of client server communication andmore specifically to client server communication via a command lineinterface.

BACKGROUND OF THE INVENTION

Client-server networking is a distributed programming architecture wheretasks are performed by one or more service providers (servers) inresponse to requests sent by one or more clients. A client process is aprogram enabling to send messages to a server process, the messagesrequesting that the server performs a task (service). A server processis a program configured for performing one or more tasks in response toa request issued by a client. In general clients initiate communicationsessions with servers which listen to incoming requests. Servers mayreceive requests from clients to perform a variety of tasks concerningfor example, database retrieval and updates, data integrity management,storage system configuration such as volume creation, volume deletion,file system modification, etc. In a computer network, clients andservers often operate on separate hardware.

Most often, servers send a response to a client's requests (or command).A response may be sent immediately once the request is received by theserver or following the execution of the requested task. Aserver-response may include different types of information. For example,a server-response may include specific information requested by theclient, a message indicating that the request has safely reached itsdestination, or it may comprise of status information informing theclient e.g. whether the server has successfully completed the task orwhether the server failed to do so. Clients are specifically configuredfor reading these responses, where different responses require specificadaptation of the client for reading them.

SUMMARY OF THE INVENTION

According to a first aspect of the invention there is provided a methodof automatic generation of client CLI response-objects, the objectsbeing configured for reading a server CLI response-object sent by aserver to a client in response to a CLI-command sent by the client, themethod being carried out in a client, and comprising:

-   -   (a) receiving from the server at least one CLI response        comprising at least a server CLI response-object and a client        class-header of a corresponding client CLI communication class,        the client CLI communication class being configured for        generating the client CLI response-object for reading the server        CLI response-object;    -   (b) receiving the client CLI communication class;    -   (c) generating a client CLI response-object configured for        reading the server CLI response-object, wherein the generating        is based on the received client CLI communication class and the        received client class-header and by using a processor for        utilizing reflection programming; and    -   (d) utilizing the client CLI response-object for reading data        provided within the server CLI response-object, wherein the        utilizing is performed by using a processor.

According to a second aspect of the invention there is provided a methodof automatic generation of client CLI response-objects configured forreading a server CLI response-object sent by a server to a client inresponse to a CLI command sent by the client, the method being carriedout in a server and comprising:

-   -   (a) configuring the server with a server CLI communication class        and a corresponding client CLI communication class and client        class-header; the server CLI communication class is adapted for        generating a server CLI response-object for the CLI-command, and        the client CLI communication class is adapted for generating a        client CLI response-object for reading data within the CLI        response-object;    -   (b) generating a server CLI response-object of the CLI-command,        wherein the generating is based on the server CLI communication        class and is performed by using a processor, and;    -   (c) sending a CLI response to the client in reply to an incoming        CLI-command from the client; the CLI response comprising at        least the server CLI response-object and the client        class-header; and    -   (d) sending the client CLI communication class to the client;        wherein the client CLI communication class and the client        class-header enable the client to generate, with the help of        reflection programming, a client CLI response-object, and to        utilize the client CLI response-object for reading information        from the server CLI response-object.

According to a third aspect of the invention there is provided a clientbeing operable in a client-server communication architecture, the clientbeing configured to read a server CLI response-object sent by a serverin response to a CLI-command, the client comprising:

-   -   a processor, and a client CLI process, the client CLI process        comprising a CLI object generator; the processor being        configured to perform tasks in response to instructions        generated by the client;    -   the client CLI process is configured to send a CLI-command to a        server and receive a CLI response from the server, the CLI        response comprising a client CLI communication class, a client        class-header and a server CLI response-object;    -   the client CLI object generator is configured to provide the        processor with instructions for generating a client CLI        response-object, wherein the client CLI response-object is        generated with the help of reflection programming, based on the        client class-header and the client CLI communication class;    -   the CLI process is further configured to provide the processor        with instructions for utilizing the client CLI response-object        for reading the server CLI response-object.

According to a fourth aspect of the invention there is provided a serverbeing operable in client-server communication architecture, the serverbeing configured for receiving a CLI-command from a client and returninga server CLI response-object to the client, the server comprising:

-   -   a CLI server process and a processor; the processor being        configured to perform tasks in response to instructions        generated by the server;    -   in response to a CLI-command received from a client, the CLI        server process is configured to instruct the processor to        perform at least the following:        -   (a) retrieve from the data-repository a corresponding server            CLI communication class configured for generating a server            CLI response-object corresponding to the CLI-command;        -   (b) retrieve from the data-repository a corresponding client            CLI communication class configured for generating a CLI            object for reading the server CLI response-object;        -   (c) retrieve from the data-repository a client class-header            corresponding to the client CLI communication class;        -   (d) generate a server CLI-response-object being an instance            of the server CLI communication class;    -   the CLI server application is further configured to send to the        client a CLI-response, the CLI response comprising the server        CLI-response-object, the client class-header and the client CLI        communication class, thereby enabling the client to utilize the        client class-header and the client CLI communication class and        with the help of reflection programming, to generate a client        CLI response-object configured for reading the server CLI        response-object.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to understand the invention and to see how it may be carriedout in practice, a preferred embodiment will now be described, by way ofnon-limiting example only, with reference to the accompanying drawings,in which:

FIG. 1 is a block diagram schematically illustrating client-serverarchitecture, in accordance with an embodiment of the invention;

FIG. 2 is a flowchart showing the principle operations carried out, inaccordance with an embodiment of the invention;

FIG. 3 is a flowchart showing the principle operations carried out by aserver, in accordance with an embodiment of the invention;

FIG. 4 is a flowchart showing the principle operations carried out by aclient, in accordance with an embodiment of the invention;

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Unless specifically stated otherwise, as apparent from the followingdiscussions, it is appreciated that throughout the specificationdiscussions utilizing terms such as “processing”, “computing”,“determining”, “generating”, “recognizing”, “setting”, “configuring”,“identifying” or the like, refer to the action and/or processes of acomputer that manipulate and/or transform data into other data, saiddata represented as physical, e.g. such as electronic, quantities andrepresenting the physical objects. The term “computer” should beexpansively construed to cover any kind of electronic device with dataprocessing capabilities, including, by way of non-limiting example,personal computers, servers, computing system, communication devices,processors (e.g. digital signal processor (DSP), microcontrollers, fieldprogrammable gate array (FPGA), application specific integrated circuit(ASIC), etc.) and other electronic computing devices and combinationsthereof.

The operations in accordance with the teachings herein may be performedby a computer specially constructed for the desired purposes or by ageneral purpose computer specially configured for the desired purpose bya computer program stored in a computer readable storage medium.

In addition, embodiments of the present invention are not described withreference to any particular programming language. It will be appreciatedthat a variety of programming languages may be used to implement theteachings of the inventions as described herein.

As used herein, the phrase “for example,” “such as” and variants thereofdescribing exemplary implementations of the present invention areexemplary in nature and not limiting. Reference in the specification to“one embodiment”, “an embodiment”, “some embodiments”, “anotherembodiment”, “other embodiments”, “certain embodiment” or variationsthereof means that a particular feature, structure or characteristicdescribed in connection with the embodiment(s) is included in at leastone embodiment of the invention. Thus the appearance of the phrase “oneembodiment”, “an embodiment”, “some embodiments”, “another embodiment”,“other embodiments”, “certain embodiments” or variations thereof do notnecessarily refer to the same embodiment(s).

It is appreciated that certain features of the invention, which are, forclarity, described in the context of separate embodiments, may also beprovided in combination in a single embodiment. Conversely, variousfeatures of the invention, which are, for brevity, described in thecontext of a single embodiment, may also be provided separately or inany suitable sub-combination. While the invention has been shown anddescribed with respect to particular embodiments, it is not thuslimited. Numerous modifications, changes and improvements within thescope of the invention will now occur to the reader.

In embodiments of the invention, fewer, more and/or different stagesthan those shown in FIG. 2, FIG. 3 and FIG. 4 may be executed. Inembodiments of the invention one or more stages illustrated in FIG. 2,FIG. 3 and FIG. 4 may be executed in a different order and/or one ormore groups of stages may be executed simultaneously. FIG. 1 illustratesa general schematic of the system architecture in accordance with anembodiment of the invention. Each module in FIG. 1 can be made up of anycombination of software, hardware and/or firmware that performs thefunctions as defined and explained herein. The modules in FIG. 1 may becentralized in one location or dispersed over more than one location. Inother embodiments of the invention, the system may comprise fewer, more,and/or different modules than those shown in FIG. 1.

Unless defined otherwise, all technical and scientific terms used hereinhave the same meaning as commonly understood by one of ordinary skill inthe art to which this invention belongs. Generally (although notnecessarily), the nomenclature used herein described below is well knownand commonly employed in the art. Unless described otherwise,conventional methods are used, such as those provided in the art andvarious general references.

Turning now to a detailed description of certain embodiments of thepresent invention, one example of a common mechanism used by client tocommunicate with a server is a command-line interface (CLI). A CLI is aprocess implemented as a textual interface which enables a user tointeract with a computer by typing commands requesting the computer toperform specific tasks. A CLI may be utilized for example, forinteracting with a computer's own operating system or software or forinteracting between different computers. A CLI is often used for sendingCLI-commands (or requests) from a client (e.g. on one computer) to aserver (e.g. on another computer).

The CLI-command (or request) is sent as a text message from the clientto the server. The server executes the command and sends a response tothe client. Although the server-response may return as a text-file, thisapproach is not widely used. A server-response in format of a text-filemust be adapted to a specific inflexible textual format which isfamiliar and readable by the receiving client. Therefore, the servermust have knowledge of certain properties of the receiving client whichmay vary from one client to another, for example, the type ofapplications and the type of buffers which are used by the receivingclient. Thus, it is difficult to construct universal server-responses intext format while being unaware of the client's properties, and eachserver-response must be constructed according to the specificcharacteristics of a specific communicating client.

Accordingly, a common approach implemented in servers for returning aresponse is sending one or more objects, in response to a CLI-commandissued by a client. In the following discussion such objects are named‘server CLI response-objects’. These server CLI response-objects arecharacterized by a known universal format which enables the server toprovide the same type of objects to all communicating clients, while theserver is not aware of specific characteristics of the client to whichthe objects are being sent. In this way the server is not required toadapt its responses to each specific client from which it receives arequest. In general these objects are generated in runtime in responseto a CLI-command by a complied code comprising appropriate servercommunication classes.

On the client side, the client is configured to recognize, read anddisplay the incoming server CLI response-objects. In order to do so, theclient is required to comprise appropriate software (i.e. code) forgenerating, in runtime, client CLI response-objects directed to enablethe client to process and read server CLI response-objects sent by aserver. Part of this code is provided to the client together with theCLI package which is installed on the client and enables the client tocommunicate with the server via a CLI. The code comprises appropriateinter alia, client communication classes for generating the relevantclient CLI response-object.

However, new types of objects, which are generated by a server and areunfamiliar to the client, require that the client is provided with newcode, (including inter alia, the corresponding communication classes) inorder to enable the client to process and read the new objects.Therefore, when a new server CLI response-object is introduced by aserver, new compatible code is required to be written locally, orotherwise obtained, for each client which receives the new server CLIresponse-object for the first time. The new code is adapted forprocessing and reading the new server response-object according to thespecific properties of the relevant client. This shortcoming requiresthat users and/or administrators of each client continuously update thecode utilized by the client and adapt it to continuous changes inobjects received from the server.

According to certain embodiments there is provided a system and methodwhich enables clients to automatically generate client CLIresponse-objects directed for reading new unfamiliar server CLIresponse-objects which are received from servers without the need towrite or obtain new code for each new server response-object.

In the following description command line interface (CLI) communicationis used to exemplify the present invention, however it should be notedthat this is an example only which is used for the sake of betterclarity and should not be construed as limiting the invention to CLIcommunication alone. While, the system and method disclosed herein maybe implemented and operated for enabling automatic code generation forother types of client-server communication techniques as well.

Turning to FIG. 1, this block diagram schematically illustratesclient-server architecture 100, in accordance with an embodiment of theinvention. FIG. 1 shows a client 110 connected via a communication meansor network (e.g. wired or wireless network implemented by any knowntechnology) to a server 130. It should be noted that although FIG. 1depicts a single client connected to a server, more than one client mayconnect and communicate with the same server and a single client maycommunicate with more than one server. The terms “client” and “server”as used herein may refer to the entire hardware device encapsulating thelogic of a client process and/or server process. Alternatively oradditionally the terms “client” and “server” may refer to a softwareimplementation of the logic of a client or server (i.e. process) beingembedded within an appropriate hardware device. Clients 110 may be, butare not limited to, personal or portable computers, PDAs, cellularphones or any other apparatus having the appropriate processing powerfor running a client process and equipped with the proper communicationfacilities. Servers 130 may be, but are not limited to, personal orportable computers. Servers are often implemented as dedicatedserver-computers which are characterized by faster CPU, high performanceRAM and possibly multiple hard drives and a large storage space. Server130 and client 110 in FIG. 1 are associated each, with at least oneprocessor 150, 129, respectively. Processor 150 and 129 are configuredto manage and control relevant components and operations, and to performtasks in response to instructions generated by server 130 and client110, respectively.

Client 110 comprises a client CLI application (or process) 120,configured in general for enabling the client to send CLI-commands to beperformed by a server and receive in return CLI responses. In thecontext of the present invention the term “CLI-response” refers to aserver-response sent from a server to a client in reply to aCLI-command. According to certain embodiments, client 110 is associatedwith a user interface 114 (e.g. a mouse and a key pad) and a display 116(e.g. LCD screen). The user interface 114 and the display may beutilized by a user of client 110 for sending a CLI-command and viewingtextual information in respect of outgoing CLI-commands and returningCLI-responses.

According to certain embodiments, client CLI application 120 comprises acommand line interface (CLI) 128. Command line interface 128 istypically displayed on display 116 and is configured for enabling a user(e.g. via user interface 114) to type and send CLI-commands and to viewdata within incoming CLI-responses.

Turning now to the description of server 130 and its component,according to certain embodiments, server 130 comprises a server CLIapplication 140 and is associated with a server CLIcommunication-classes data-repository 132 and client CLIcommunication-classes data-repository 134.

Data-repositories 132 and 134 are configured for storing compiled codewhich includes server and client communication classes which arerequired for enabling communication between server 130 and clients 110which connect to the server.

These classes include, inter alia, CLI communication classes whichenable communication between server 130 and client 110 via a CLI. Theserver CLI communication classes are used for generating server CLIresponse-objects which are sent to clients in response to a CLI-command.The client CLI communication classes are used for generating client CLIresponse-objects configured for reading server CLI response-objects.Each CLI-command has at least one corresponding server CLI communicationclass and at least one corresponding client CLI communication class. Theserver CLI communication class is used by server 130 for generating aserver CLI response-object for the corresponding CLI-command. The clientCLI communication class is used by client 110 for generating a clientCLI response-object which enables a client to read a correspondingserver CLI response-object.

According to a certain embodiment, server CLI communication-classesdata-repository 132 is configured for storing server CLI communicationclasses and client CLI communication-classes data-repository 134 isconfigured for storing client CLI communication-classes data-repository134.

Data-repositories 132, 134 and 136 may be directly associated withserver 130, for example they may be located on the same device as server130, or directly connected to the device of server 130. Alternatively oradditionally, data-repositories 132, 134 and 136 may be located on aremote device which is accessible to server 130 via any type ofcommunication means or network (e.g. wired or wireless network).Data-repositories 132, 134 and 136 may be configured as a number ofdistributed data-repository units or as a single data-repository unit.

According to certain embodiments, together with the generation of serverand client CLI communication classes, CLI client communication headersare also generated. In the context of the present invention the termclient CLI communication header (or in short ‘client class-headers’ or‘class-header’) are simplified data-structures that represent thebackbone of a class including for example, function names and variablenames of the different fields and attributes corresponding to eachclass. According to certain embodiments of the invention, these clientclass-headers are essential for the generation of new client CLIresponse objects, as explained in more detail below. Clientclass-headers may be stored, for example, within clientcommunication-classes data-repository 134 or otherwise within aspecifically designated data-repository.

One example of a method of generating client and server communicationclasses, (including CLI communication classes) is by utilizing Google'sProtocol Buffers utility (abbreviated Protobuff). Protobuff is anautomated mechanism for serializing structured data. Protobuff enablesto create relatively simple structures representing the desired clientclasses and server classes and then by using specifically generatedsource code, to easily write and read the structured data to and from avariety of data streams by using a variety of languages. Protobuff runsas part of the pre-compiling process of the server and client codes. Forexample, Protobuff enables to produce from a single structure, two newtypes of communication classes, a communication class, associated with aC++ code running in the server and a communication class associated withthe Java code and running in the client. (For more information withregard to Protobuff see http://code.google.com/p/protobuf/).

In addition to the different classes which may be generated, theProtobuff pre-compilation process also produces client class-headers ofthe compiled classes. Thus, Protobuff provides a simple method forgenerating both client and server communication class and thecorresponding client class-headers.

Alternatively or additionally, server and client communication classesand class headers may be generated by other methods. For example, clientcommunication classes and server communication class may be generatedmanually by writing the code for each type of class individually.Headers may be generated automatically for example by utilizing SimpleObject Access Protocol (SOAP). In general SOAP is a protocolspecification for exchanging structured information between servers incomputer networks. When using SOAP in a server, in response to a request(e.g. CLI-command) which is sent to the server, the server may return anXML-formatted document with the resulting data. Thus, according tocertain embodiments, SOAP may be utilized for generating a headerincluding for example the variable name of the different fields andattributes corresponding to each class. According to certainembodiments, the XML header may be utilized as a client class-header forthe purpose of the present invention as explained below.

Continuing now to describe server CLI application 140, according tocertain embodiments, it may comprise a CLI-command manager 142, a serverobject generator 144 and a CLI response manager 146. CLI-command manager142 is configured to receive a CLI-command from a client and execute thecommand (e.g. perform a requested task) specified by the CLI-command.According to certain embodiments, CLI-command manager 142 is associatedwith processor 150 which performs any processing which may be requiredfor the execution of the CLI-command. CLI-command manger 142 is furtherconfigured to receive a CLI-response, which is generated by CLI responsemanager 146 and send it to client 110.

According to certain embodiments of the invention, each CLI-response isconstructed according to the corresponding CLI-command and comprisesthree main elements: a client CLI communication class corresponding tothe relevant CLI-command, the client class-header and the server CLIresponse-object.

According to certain embodiments, server object generator 144 isconfigured to receive from CLI response manager 146, information withregard to the CLI-command that was received from the client, identifythe relevant server CLI communication class (e.g. within data repository132) and generate a corresponding server CLI response-object being aninstance of the corresponding server CLI communication class. The serverCLI response-object is generated by utilizing an appropriate code whichmay be available for example in a server code repository 136. The serverCLI response-object is transferred to CLI response manager 146.

According to certain embodiments of the invention, in response to aCLI-command, in addition to the generation of corresponding server CLIresponse-object by server object generator 144, CLI response manager 146is further configured for retrieving a client CLI communication classand a corresponding client class-header from data-repository 134. Theclient CLI communication class is the corresponding client class of theCLI-command, which can be utilized for generating the appropriate clientCLI response-object for reading the server CLI response-object generatedby the server. According to certain embodiments, the CLI responsemanager 146 is configured to transfer the CLI response to CLI-commandmanager 142. The CLI-command manager 142 in turn is configured to sendthe CLI response to the client.

Returning to client 110, according to certain embodiments, client CLIapplication 120 further comprises a client response manager 122, anobject reader 126, and client CLI object generator 124. According tocertain embodiments, a client data-repository 112 is used to storeclient class headers and possibly client CLI communication classes,which were previously utilized by client 110. Data-repository 112 may bedirectly associated with client 110, for example it may be located onthe same device as server 110, or directly connected to the device ofclient 110. Alternatively or additionally, data-repository 112 may belocated on a remote device which is accessible to client 110 via anytype of communication means or network (e.g. wired or wireless network).

According to certain embodiments, client response manager 122 isconfigured to receive the CLI response sent by CLI-command manager 142,and determine whether the client CLI communication class, adapted forgenerating a client CLI response-object for the incoming server CLIresponse-object, is stored in a client data-repository 112. In case theclient response manager 122 finds that the relevant client CLIcommunication class is stored in client data-repository 112, itretrieves the client CLI communication class and forwards it to clientobject generator 124. Client object generator 124 is configured togenerate a client CLI response-object from the client CLI communicationclass. Otherwise, in case the client CLI communication class is notfound in data-repository 112 client response manager 122 instructsclient object generator 124 to generate a new client CLI object based onthe client CLI communication class and the client class-header which arereceived from server 130.

According to certain embodiments, the client CLI response-object isgenerated with the help of Reflection oriented programming (orreflection programming), based on the client CLI communication class andthe client class-header. Reflection oriented programming is a processwhich enables dynamic program modification, which can be determined andexecuted at runtime. In reflective programming, information in respectof the program structure, which is often lost once the program iscompiled, is stored. This information includes for example, the classname, the name the methods contained within the class, other attributesetc. Reflection allows to write code that works with classes selectedduring execution, not in the source code. The classes are accessed andselected by using the stored information pertaining to the relevantclasses. Thus, codes can be assembled in run-time without beingpre-coded before compilation. For further information with regard toreflection programming see

http://portal.acm.org/citation.cfm?id=62084.62111.

According to certain embodiments of the invention client objectgenerator 124 is configured to utilize the client class-header and the(compiled) client CLI communication class and with the help ofreflection programming to generates a new client CLI response-object.The class header provides the required information (metadata) withregard to the structure of the client CLI communication class. Thisinformation is used by an appropriate code, written in accordance withthe reflection programming paradigm, to access the client CLIcommunication class and to create, in run-time, a client CLIresponse-object from the client CLI communication class. Reflectionprogramming saves specific data which allows associating between themetadata and the relevant class and creating an instance of that classin run-time. The written code is generic and is not tied to a specificCLI communication class, thus it may be used to generate an object ofany given class.

The client is thereby enabled to automatically generate an appropriateclient CLI response-object for reading an incoming server CLIresponse-object, which is unfamiliar to the client without theintervention of a human programmer and without the need to write aspecific code directed for generating a specific object.

According to a certain embodiment, once the new client CLIresponse-object is created, object reader 126 is configured to use thenew client CLI response-object for reading the server CLIresponse-object sent by the server. According to certain embodiments,the information within the server CLI response-object is transferred toCLI 128 and displayed on display 116.

According to certain embodiments, instead of sending the entire CLIresponse the CLI response manager 146 is configured to transfer theserver CLI response-object and the client class-header to theCLI-command manager 142, while delaying the transmission of the clientCLI communication class. The CLI-command manager 142 is configured tosend the server CLI response-header and the class header to the client.In case it is determined that a corresponding client CLI communicationclass is available at the client, the class is used for generating aclient CLI response-object and the generated object is used for readingthe received server CLI response-object. Otherwise, in case it isdetermined that the relevant client CLI communication class is notavailable at the server, client 110 is configured to send a request toserver 130 requesting that the corresponding client CLI communicationclass, which was delayed at server 130, is sent to the client. Once theclient CLI communication class is received at the client, it is usedtogether with the previously received client class-header for generatinga new client CLI response-object, with the help of reflectionprogramming. According to certain embodiments, the client CLIcommunication class is not retrieved and assembled as part of theCLI-response until after a specific request is received from client 130.

According to some embodiments, instead of sending the entire CLIresponse, the CLI response manager 146 is configured to transfer theclient CLI communication class and the client class-header to theCLI-command manager 142, while delaying the transmission of the serverCLI response object. The CLI-command manager 142 is configured to sendthe client CLI communication class and the class header to the client.Once a new client CLI response-object is created, client responsemanager 122 requests from server 130 to send to client 110 the serverCLI response-object, which has been previously delayed by CLI commandmanager 142. The server CLI response-object is received by clientresponse manager 122 and sent together with the corresponding new clientCLI response-object to object reader 126 for reading.

FIG. 2 is a flowchart 200 showing the principal operations carried out,in accordance with an embodiment of the invention. It should be notedthat while FIG. 2 illustrates operations performed by both a client anda server, FIG. 3 illustrates the operations performed only by a serverand FIG. 4 illustrates operation performed only by a client. As stagesin FIG. 2 overlap with stages in FIG. 3 and FIG. 4, in the followingdiscussion where overlapping stages, which are relevant to more than onefigure, are described, reference is made to all relevant figures.

In the initial stage 202, (302), client and server CLI communicationclasses are stored in designated communication-class data repositoriesassociated with the server. Stage 202 is preceded with a stage which maybe considered as a preliminary stage, in which the code of the clientand server communication classes which enable communication between aserver to a client is generated and compiled. According to certainembodiments, the generated communication classes include at least serverand client CLI communication classes. As mentioned above, in someembodiment, this stage is performed with the help of Protobuff or it maybe performed by other methods. The generated classes are stored indesignated communication-class data-repositories. The generated classesare directed for generating corresponding client CLI objects in theclient and server CLI object in the server directed for handlingclient-server communications by CLI. As mentioned above, as part of thepreliminary generation process of client CLI communication classes,client class-headers are also generated. The class-headers are stored inthe appropriate data repository as well.

According to certain embodiments, in stage 204 a CLI-command is sentfrom client to server. For example the communication may be initiated byclient 110 sending a CLI-command via a client CLI 128 to CLI-commandmanager 142 in server 130. In the next stage 206, (306) the CLI-commandis received by the server and the server attempts to execute theCLI-command. As mentioned above a CLI-command is a request, made to aserver by a client, to perform a certain task. Once the server receivesthe request it attempts to complete the task.

According to certain embodiments, in the following stage 208, (308), theserver generates a CLI-response to the client. The CLI-responsecomprises a client CLI communication class, the client class-header anda server CLI response-object. Client CLI communication class is theclient class which is used as a template to create a client CLIresponse-object. A client CLI response-object, which is generated basedon a client CLI communication class, is used to read a correspondingserver CLI response object. In some embodiments, the relevant client CLIcommunication class and the class header are retrieved by CLI responsemanager 146 from client communication-classes data-repository 134.Server CLI response-object is generated by the server based on acorresponding server CLI communication class.

Alternatively, CLI-response may comprise of only sever the CLIresponse-object and the client class-header, while the client CLIcommunication class is retrieved from data-repository and send to clientonly in response to a specific request.

According to one embodiment, a CLI-response is divided into two parts,the first part comprising the server CLI response-object and the clientclass-header and the second part comprising the client CLI communicationclass. In stage 210, (310) the first part of the CLI response is sent tothe client. For example, the server CLI response-object and the clientclass-header may be transmitted from CLI response manger 146 toCLI-command manger 142 and then sent to client 110. In stage 212, (404)the client receives the server CLI response-object and the clientclass-header which are sent by the server. The server CLIresponse-object and the client class-header may be transferred, forexample, to client response manager 122.

According to certain embodiments, in stage 213, (406) it is determinedwhether the corresponding client CLI communication class, configured forgenerating a client CLI response-object for reading the incoming serverCLI response-object, is available to the client. To this end, in oneexample, the incoming client class-header is compared with other clientclass-headers which are stored in a data-repository associated with theclient. In some cases the comparison between the client class-headersstored at data-repository and new client class-headers received fromserver 130 may be based on exact identity between the clientclass-headers, while in other cases partial similarity (e.g. restrictedto a specific subset of fields of the client class-header) may suffice.

According to certain embodiments, in case it is determined in theprevious stage that the corresponding client CLI communication class isnot available to the client (e.g. the incoming client class-header isnot stored in the client data-repository indicating that the relevantcommunication class has never been used by the client) stage 214, (408)follows. In stage 214 (408) the client requests the server to send thepreviously delayed client CLI communication class. In response to therequest issued by the client, the server sends to client thecorresponding client CLI communication class (stage 312).

According to some embodiments, the CLI-response is not divided and istransmitted from server 130 to client 110 in its entirety includingclient CLI communication class, client class-header and server CLIresponse-object. In this embodiments, stage 214 (408) may be omitted.

Once the client CLI communication class is received at the client, aclient CLI response-object is generated, based on the client CLIcommunication class and the client class-header with the help ofreflection programming (see stage 218 (412)). Thus, in stage 218 (412)the client automatically generates an appropriate client CLIresponse-object for reading an incoming and server CLI response-object,where the incoming server CLI response-object is unfamiliar to theclient and where the client is not configured with a specificallyprogrammed code for reading the specific incoming object.

a client CLI response-object for reading an incoming server CLIresponse-object, wherein the incoming server CLI response-object isunfamiliar to the client

A more detailed explanation with regard to reflection programming isspecified above with reference to FIG. 1. Stage 218, (412) may beperformed for example, by client object generator 124.

According to certain embodiments, in case it is determined in stage 213(406) that the corresponding client CLI communication class is availableto the client (e.g. the incoming class header is stored in the clientdata-repository indicating that the relevant communication class hasalready been used in the past by the client) stage 216, (410) follows.Stage 213 (406) may be performed for example by client response manger122. In stage 216 (410) the corresponding client CLI communication classis retrieved from the appropriate data-repository and in stage 220(411), a client CLI response-object is generated based on the retrievedclient CLI communication class. Stage 220 (411) may be performed forexample by client object generator 124.

At this stage of process 200 client 110 comprises a client CLIresponse-object which can be used to read the incoming server CLIresponse-object. According to certain embodiments, in stage 222, (414)the client utilizes the client CLI response-object and reads theinformation within the server CLI response-object. According to certainembodiments, the information within the server CLI response-object isdisplayed to the user via an associated display 116.

According to certain embodiments, client 110 does not store client CLIcommunication classes and is rather configured to always generate clientCLI response-objects based on client CLI communication classes and classheaders which are received from a server. According to this embodiments,stage 213 (406) is omitted and once the CLI-response is received by theclient, client turns to generating, with the help of Reflectionprogramming, the client CLI-response object based on the received clientCLI communication class and the received client class-header asdescribed above with reference to stage 218 (412).

While various embodiments have been shown and described, it will beunderstood that there is no intent to limit the invention by suchdisclosure, but rather, it is intended to cover all modifications andalternate constructions falling within the scope of the invention, asdefined in the appended claims.

1. A method of automatic generation of client CLI response-objects, saidobjects being configured for reading a server CLI response-object sentby a server to a client in response to a CLI-command sent by saidclient, the method being carried out in a client, and comprising: (a)receiving from said server at least one CLI response comprising at leasta server CLI response-object and a client class-header of acorresponding client CLI communication class, said client CLIcommunication class being configured for generating the client CLIresponse-object for reading said server CLI response-object; (b)receiving said client CLI communication class; (c) generating a clientCLI response-object configured for reading said server CLIresponse-object, wherein said generating is based on said receivedclient CLI communication class and said received client class-header andby using a processor for utilizing reflection programming; and (d)utilizing said client CLI response-object for reading data providedwithin said server CLI response-object, wherein said utilizing isperformed by using a processor.
 2. The method of claim 1 furthercomprising stage (e) of displaying a textual message within said serverCLI response-object on a display.
 3. The method of claim 1 wherein saidclient CLI communication class, said server CLI communication class andsaid client class-header are generated by utilizing Google ProtocolBuffer utility.
 4. The method of claim 1 wherein said clientclass-header is an XML based header and is generated by utilizing SimpleObject Access Protocol.
 5. The method of claim 1 wherein said server CLIresponse-object is generated by said server based on a server CLIcommunication class corresponding to said CLI-command.
 6. The method ofclaim 1 wherein said CLI response further comprises said server CLIresponse-object.
 7. The method of claim 1 further comprising stage(a)(i) comprising: determining whether said client CLI communicationclass is stored in a data-repository associated with said client;wherein in case it is not, requesting said client CLI communicationclass from said server and proceeding to stage (b) and wherein in caseit is, generating a client CLI response-object based on a relevantclient CLI communication class available at said client and proceedingto stage (d).
 8. The method of claim 7 wherein said determining isperformed by comparing said client class-header with at least one otherclient class-header stored at said data-repository.
 9. A method ofautomatic generation of client CLI response-objects configured forreading a server CLI response-object sent by a server to a client inresponse to CLI command sent by said client, the method being carriedout in a server and comprising: (a) configuring said server with aserver CLI communication class and a corresponding client CLIcommunication class and client class-header; said server CLIcommunication class is adapted for generating a server CLIresponse-object for said CLI-command, and said client CLI communicationclass is adapted for generating a client CLI response-object for readingdata within said CLI response-object; (b) generating a server CLIresponse-object of said CLI-command, wherein said generating is based onsaid server CLI communication class and is performed by using aprocessor, and; (c) sending a CLI response to said client in reply to anincoming CLI-command from said client; said CLI response comprising atleast said server CLI response-object and said client class-header; and(d) sending said client CLI communication class to said client; whereinsaid client CLI communication class and said client class-header enablesaid client to generate, with the help of reflection programming, aclient CLI response-object, and to utilize said client CLIresponse-object for reading information from said server CLIresponse-object.
 10. The method of claim 9 wherein said CLI responsefurther comprises said server CLI response-object.
 11. The method ofclaim 9 wherein stage (d) is performed in response to a request issuedby said client.
 12. The method of claim 9 wherein a Google ProtocolBuffer utility is used to instruct a processor to generate said clientCLI communication class, said server CLI communication class and saidclient class-header.
 13. The method of claim 9 wherein said clientclass-header is an XML based header and is generated by utilizing SimpleObject Access Protocol.
 14. The method of claim 9 wherein said server isassociated with at least one data repository and wherein said server CLIcommunication class, said client CLI communication class and said clientclass-header are obtained from said at least one data-repository.
 15. Aclient being operable in a client-server communication architecture,said client being configured to read a server CLI response-object sentby a server in response to a CLI-command, said client comprising: aprocessor, and a client CLI process, the client CLI process comprising aCLI object generator; said processor being configured to perform tasksin response to instruction generated by said client; said client CLIprocess is configured to send a CLI-command to a server and receive aCLI response from said server, said CLI response comprising a client CLIcommunication class, a client class-header and a server CLIresponse-object; said client CLI object generator is configured toprovide said processor with instructions for generating a client CLIresponse-object, wherein said client CLI response-object is generatedwith the help of reflection programming, based on said clientclass-header and said client CLI communication class; said CLI processis further configured to provide said processor with instructions forutilizing said client CLI response-object for reading said server CLIresponse-object.
 16. The client of claim 15 being associated with adisplay and wherein said client CLI process is further configured todisplay the information within said server CLI response-object on saiddisplay.
 17. The client of claim 15 wherein said client class-header isgenerated by Google Protocol Buffer utility.
 18. A server being operablein a client-server communication architecture, said server beingconfigured for receiving a CLI-command from a client and returning aserver CLI response-object to said client the server comprising: a CLIserver process and a processor; said processor being configured toperform tasks in response to instructions generated by said server; inresponse to a CLI-command received from a client, said CLI serverprocess is configured to instruct said processor to perform at least thefollowing: (a) retrieve from said data-repository a corresponding serverCLI communication class configured for generating a server CLIresponse-object corresponding to said CLI-command; (b) retrieve fromsaid data-repository a corresponding client CLI communication classconfigured for generating a CLI object for reading said server CLIresponse-object; (c) retrieve from said data-repository a client CLIcommunication class-header corresponding to said client CLIcommunication class; (d) generate a server CLI-response-object being aninstance of said server CLI communication class; said CLI serverapplication is further configured to send to said client a CLI-response,said CLI response comprising said server CLI-response-object, saidclass-header and said client CLI communication class, thereby enablingsaid client to utilize said class-header and said client CLIcommunication class and, with the help of reflection programming, togenerate a client CLI response-object configured for reading said serverCLI response-object.
 19. The server of claim 18 wherein said server CLIcommunication class, client CLI communication class and clientclass-header are generated by utilizing Google Protocol Buffers utility.20. The server of claim 15 wherein said CLI-response is divided into twoparts, a first part comprising said server CLI response-object andclass-header and a second part comprising client CLI communicationclass; and wherein said server CLI application is configured to sendsaid first part in response to a CLI-command and send said second partin response to a specific request from said client.